<%@attribute name="word" type="java.lang.String" required="true" %>
<%@ tag import="java.util.*,java.util.regex.*" %>
<%@ variable name-given="words" variable-class="java.util.HashSet" scope="AT_BEGIN" %>
<%
    HashSet<String>set= new HashSet<>();
    Pattern p=Pattern.compile("[a-zA-Z']+");
    Matcher m=p.matcher(word);
    while(m.find())
        set.add(m.group());
    jspContext.setAttribute("words", set);
%>